﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo07
{
    class Shape
    {
        public string color;
        public string Color { get; set; }

        public virtual void GetArea()
        {
            Console.WriteLine("请输入1、圆面积 2、正方形面积");
            double key = double.Parse(Console.ReadLine());
            switch (key)
            {
                case 1:
                    Circle circle = new Circle();
                    circle.GetArea();
                    break;

                case 2:
                    Square square = new Square();
                    square.GetArea();
                    break;
                default:
                    Console.WriteLine("没有这个选项");
                    GetArea();
                    break;
            }
        }
    }
}
